<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>

    <input type="text">
    
<script>
    let input = document.querySelector("input")











    input.addEventListener("keypress", function(e) {
        console.log("按了键盘")
        console.log(e)
    })
</script>
</body>
</html>